from ultralytics import YOLO

if __name__ == '__main__':
    # 加载模型
    model = YOLO(r'D:/xyz/yolov8-py-side6-gui-main-master/models/yolov8-fire.pt')  # YOLOv8n模型

    # Define path to the image file
    source = "F:/expworkplace/firesmoke/firesmokedata/images/train/fire_000003.jpg"

    # Run inference on the source
    results = model(source,save=True)  # list of Results objects
